package com.tk.exam.mapper;

import com.tk.exam.bo.QuestionsSortBo;
import com.tk.exam.domain.TkQuestions;
import com.tk.exam.domain.TkQuestionsExample;
import java.util.List;
import java.util.Map;

import com.tk.exam.domain.TkRPaperQuestion;
import com.tk.exam.vo.question.TkQuestionVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public interface TkQuestionsMapper {
    int countByExample(TkQuestionsExample example);

    int deleteByExample(TkQuestionsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TkQuestions record);

    int insertSelective(TkQuestions record);

    List<TkQuestions> selectByExampleWithBLOBsWithRowbounds(TkQuestionsExample example, RowBounds rowBounds);

    List<TkQuestions> selectByExampleWithBLOBs(TkQuestionsExample example);

    List<TkQuestions> selectByExampleWithRowbounds(TkQuestionsExample example, RowBounds rowBounds);

    List<TkQuestions> selectByExample(TkQuestionsExample example);

    TkQuestions selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") TkQuestions record, @Param("example") TkQuestionsExample example);

    int updateByExampleWithBLOBs(@Param("record") TkQuestions record, @Param("example") TkQuestionsExample example);

    int updateByExample(@Param("record") TkQuestions record, @Param("example") TkQuestionsExample example);

    int updateByPrimaryKeySelective(TkQuestions record);

    int updateByPrimaryKeyWithBLOBs(TkQuestions record);

    int updateByPrimaryKey(TkQuestions record);

    List<TkQuestionVo> searchTkQuesList(Map<String,Object> map);

    /**
     * 根据试卷id和试题类型获取试题
     * @param type
     * @param examPaperId
     * @return
     */
    List<QuestionsSortBo> selectByExamPaperIdAndQuestionType(@Param("type") Byte type,@Param("examPaperId") Integer examPaperId);

    List<TkQuestions> batchGetQuestionById(@Param(value = "list") List<TkRPaperQuestion> list);
}